<?php
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require_once(ROOT_PATH . 'includes/lib_order.php');
require_once(ROOT_PATH . 'includes/lib_goods.php');
require_once('../includes/lib_main.php');

$goodsid = $_REQUEST['gid'];
$userid = $_REQUEST['uid'];
$orderno = $_REQUEST['oid'];

$userdata = get_user_info($userid);
$goodsdata = get_goods_info($goodsid);
//var_dump($goodsdata);

if($goodsid=='' || $userid==''){
    echo '参数错误';
    exit;
}



$sql = "select * from  fmmaked  where uid=".$userid." and goods_id=".$goodsid;
$data = $GLOBALS['db']->getAll($sql);
$pc = count($data);
//var_dump($data);

//topbar
$smarty->assign('ur_here', '成品列表');
//$smarty->assign('action_link', array('href' => '#', 'text' => '关闭'));

$smarty->assign('oid', $orderno);
$smarty->assign('uid', $userid);
$smarty->assign('gid', $goodsid);
$smarty->assign('pcs', $pc);
$smarty->assign('photos', $data);
$smarty->assign('userinfo', $userdata);
$smarty->assign('goodsinfo', $goodsdata);

//assign_query_info();
$smarty->display('kl_getUserMaked.htm');
?>